﻿<%@ Page Language="VB" MasterPageFile="~/masterpages/Main.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="users_messages_Default" title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="fullContent">
        <h2>Messages</h2>
        
        <asp:GridView ID="gridMessages" runat="server" DataKeyNames="MessageID" 
            AutoGenerateColumns="False" CellPadding="8" ForeColor="#333333" 
            GridLines="None" Width="555px" AllowPaging="True" AllowSorting="True">
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <%#Eval("Read")%>
                        <asp:Image ID="imgRead" runat="server" ImageUrl="~/img/messageOpen.png" />
                        <asp:Image ID="imgUnread" runat="server" ImageUrl="~/img/messageNew.png" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="From">
                    <ItemTemplate>
                       <asp:linkbutton ID="btnSelect" runat="server" CommandName="Select" CommandArgument='<%# Bind("Read") %>' Text='<%# Eval("FName") & " " & Eval("LName") %>' />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:BoundField DataField="Subject" HeaderText="Subject" >
                <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Date" DataFormatString="{0:t}" HeaderText="Date" >
                <HeaderStyle HorizontalAlign="Left" />
                </asp:BoundField>
            </Columns>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#999999" />
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        </asp:GridView>
        
        <asp:Label ID="lblText" runat="server" />
    </div>
</asp:Content>

